{config_load file=test.conf section="setup"}
{include file="header.tpl" title=info}




<div class="header"></div>
<div class="nav">
    <a href="home.php">主页</a>
    <a href="profile.php" class="active">个人</a>
    <a href="#">群组</a>
    <a href="#">搜索</a>
</div>
<div class="mainContent">
    <div class="left">
      <div class="slider">
      	<div class="headPortrait">
        	<h3>
			<span class="sex" ><samp title="{if $info.user_info.sex == 'F'}女生{elseif $info.user_info.sex == 'M'}男生{else}保密{/if}" 
			 class="ico-pos-online-{if $info.user_info.sex == 'F'}woman{elseif $info.user_info.sex == 'M'}man{else}hide{/if}" ></samp></span>
			{$info.user_info.real_name}
			<font style="margin:0 5px;">@</font>{$info.user_info.current_city}</h3>
			
            <img src="../img/bigHead_{$info.user_info.image_path}" />
            
			<p></p>
			
            <table cellpadding="0" cellspacing="0">
            	<tr><td>上次登陆：</td><td>{$info.user_info.last_ip}</td></tr>
                <tr><td>登录地点：</td><td>XXX北京</td></tr>
				<tr><td>注册日期：</td><td>{$info.user_info.register_date}</td></tr>
                <tr height="10"></tr>
                <tr><td><a href="#" target="_blank">更换头像</a></td><td><a href="#" target="_blank">我的邮箱</a></td></tr>
                <tr><td><a href="#" target="_blank">朋友邀请</a></td><td><a href="#" target="_blank">接待邀请/回复</a></td></tr>
            </table>
        </div>
        <div class="info">
        	
			<!--
			<p>注册日期：{$info.user_info.register_date}<br />点击率：1234<br />交换经验：有<br />
			-->
			</p>
			<!--
            <p>ECHO旅游过广东由iule接待，桂林由Bit接待，湖北由SY接待，阳朔由小肥猪接待，广西由monster接待；</p>
            <p>ECHO接待过广东的朋友iule，桂林的朋友Bit，湖北的朋友SY，阳朔的朋友小肥猪，广西的朋友Raywill来北京玩；</p>
			-->
        </div>
      </div>
	  
	  
	<div class="content">	  

	<div style="width:100%; height:22px; display:block; ">
		<a href="profile.php?action=basic" class="active">基本资料</a>
		<a href="profile.php?action=history">评价</a>
		<a href="profile.php?action=friend">收藏</a>
		<a href="profile.php?action=group">我的群组</a>
		<a href="profile.php?action=mail">我的邮件</a>
	</div>	
	
	

{if $info.action == "basic"}	
		   <table class="basicInfo" cellpadding="0" cellspacing="0" style="margin-top:15px;">	      	
        	 <tr><td class="cname">用户名</td><td>{$info.user_info.user}</td></tr>
            <tr><td class="cname">昵称</td><td>{$info.user_info.real_name}</td></tr>
            <tr><td class="cname">性别</td><td>{if $info.user_info.sex == 'F'}女生{elseif $info.user_info.sex == 'M'}男生{else}保密{/if}</td></tr>
            <tr><td class="cname">年龄</td><td>{$info.user_info.birthday}</td></tr>
            <tr><td class="cname">位置</td><td>{$info.user_info.current_city}</td></tr>
            <tr><td class="cname">家乡</td><td>{$info.user_info.hometown}</td></tr>

<!--
            <tr><td class="cname">学校</td><td>XXX</td></tr>
            <tr><td class="cname">电子邮件</td><td>XXX</td></tr>
            <tr><td class="cname">QQ</td><td>XXX</td></tr>
-->			 
            <tr><td class="cname">我想去的地方</td><td>
				{section name=city_idx loop=$info.state_list}
					{$info.state_list[city_idx].target}&nbsp; 
				{/section}
			</td></tr>
			 <tr><td class="cname">服务等级</td><td>
				{if ($info.user_info.service_provided & 1) == 1}
				订票&nbsp;
				{/if}
				{if ($info.user_info.service_provided & 2) == 2}
				导游&nbsp;
				{/if}
				{if ($info.user_info.service_provided & 4) == 4}
				住宿&nbsp;
				{/if}			
			 </td></tr>
            <tr><td class="cname">我的接待条件</td><td>
			 <div id="reception_cond">loading...</div>
			<script language="javascript">
			document.getElementById("reception_cond").innerHTML = parse_description("{$info.user_info.reception_requirement}");
			</script>
			</td></tr>
        </table>
        <a class="edit-btn editBasicInfo" href="#">编辑个人资料</a>
        <hr color="#e3eff7" size="1" />
        <div id="advantageInfo" class="advantageInfo">loading...</div>
		<script language="javascript">
			document.getElementById("advantageInfo").innerHTML = parse_description("{$info.user_info.self_description}");
		</script>
	
        <a class="edit-btn editAdvantageInfo" href="#">编辑高级资料</a>
        <hr color="#e3eff7" size="1" />
        <!-- loop -->
        <table cellpadding="0" cellspacing="0" class="msg">
		{foreach from=$info.desc_list item=desc}
        <tr class="msgblock">
        	<td class="no">1</td>
            <td class="head"><a href="friend.php?uid={$desc.reply_from_uid}"><img src="../images/icon/{$desc.image_path}" /></a></td>
            <td class="text">
            	<h6>{$desc.real_name}</h6><span>[{$desc.desc_time}]</span><!--<a href="#">回复</a>-->
                <div class="leavemsg">{$desc.content}</div>
                <!-- <div class="backmsg"><span><h6>ECHO:</h6>“兄弟，谢谢啦！”</span></div> -->
            </td>
        </tr>		
		{/foreach}
        <!-- end loop -->
        </table>

{elseif $info.action == "history"}
		<!-- loop -->
        <table cellpadding="0" cellspacing="0" class="msg">
		{foreach from=$info.desc_list item=desc}
        <tr class="msgblock">
        	<td class="no">1</td>
            <td class="head"><a href="friend.php?uid={$desc.reply_from_uid}"><img src="../images/icon/{$desc.image_path}" /></a></td>
            <td class="text">
            	<h6>{$desc.real_name}</h6><span>[{$desc.desc_time}]</span><!--<a href="#">回复</a>-->
                <div class="leavemsg">{$desc.content}</div>
                <!-- <div class="backmsg"><span><h6>ECHO:</h6>“兄弟，谢谢啦！”</span></div> -->
            </td>
        </tr>		
		{/foreach}
        <!-- end loop -->
        </table>	
		
{elseif $info.action == "friend"}
        <table cellpadding="0" cellspacing="0" class="msg">
		<tr class="msgblock" span=3><td>我的收藏</td></tr>
		{foreach from=$info.friend_list item=fri}
        <tr class="msgblock">
        	<td class="no">1</td>
            <td class="head"><a href="friend.php?uid={$fri.uid}"><img src="../images/icon/{$fri.image_path}" /></a></td>
            <td class="text">
            	<h6>{$fri.real_name}</h6><span>[{$fri.request_time}]</span><!--<a href="#">回复</a>-->
                <div class="leavemsg">{$fri.self_description}</div>
            </td>
        </tr>		
		{/foreach}
        <!-- end loop -->
        </table>			

        <table cellpadding="0" cellspacing="0" class="msg">
		<tr class="msgblock" span=3><td>我的粉丝</td></tr>
		{foreach from=$info.fans_list item=fri}
        <tr class="msgblock">
        	<td class="no">1</td>
            <td class="head"><a href="friend.php?uid={$fri.uid}"><img src="../images/icon/{$fri.image_path}" /></a></td>
            <td class="text">
            	<h6>{$fri.real_name}</h6><span>[{$fri.request_time}]</span><!--<a href="#">回复</a>-->
                <div class="leavemsg">{$fri.self_description}</div>
            </td>
        </tr>		
		{/foreach}
        <!-- end loop -->
        </table>			
		
{elseif $info.action == "group"}
		<label> Under Construction </label>

{elseif $info.action == "mail"}
	<div style="width:100%; height:22px; display:block; ">
		<a href="profile.php?action=mail&sub=in" class="active">收件箱</a>
		<a href="profile.php?action=mail&sub=out">发件箱</a>
		<a href="profile.php?action=mail&sub=new">写新邮件</a>
	</div>	
	{if $info.sub == "in" or $info.sub == ""}
	    <table cellpadding="0" cellspacing="0" class="msg">
		<tr class="msgblock" span=3><td>收件箱</td></tr>
		{foreach from=$info.box item=box}
        <tr class="msgblock">
            <td class="head"><a href="friend.php?uid={$box.uid}"><img src="../images/icon/{$box.image_path}" /></a></td>
            <td class="text">
            	<h6>From: {$box.real_name}</h6><span>{$box.msg_title}</span><span>[{$box.msg_time}]</span><a href="profile.php?action=mail&sub=new&toid={$box.sender_id}">回复</a>
                <div class="leavemsg">{$box.msg_content}</div>
            </td>
        </tr>		
		{/foreach}
        <!-- end loop -->
        </table>
	{elseif $info.sub == "out"}
	    <table cellpadding="0" cellspacing="0" class="msg">
		<tr class="msgblock" span=3><td>发件箱</td></tr>
		{foreach from=$info.box item=box}
        <tr class="msgblock">
            <td class="head"><a href="friend.php?uid={$box.uid}"><img src="../images/icon/{$box.image_path}" /></a></td>
            <td class="text">
            	<h6>To: {$box.real_name}</h6><span>{$box.msg_title}</span><span>[{$box.msg_time}]</span><!--<a href="#">回复</a>-->
                <div class="leavemsg">{$box.msg_content}</div>
            </td>
        </tr>
		{/foreach}
        <!-- end loop -->
        </table>		
	{elseif $info.sub == "new"}
	

	<div id="SendMail">
	<form name="sendmail" method="POST" target="profile.php?action=mail&sub=sent">
	 <input type="hidden" name="sub" value="sent" />
		<div>
		{if $info.type == "defined"}
           <input type="text" name="receiver_id" value="{if $info.receiver_info != ""} {$info.receiver_info[0].user}{else} {/if}" />
		 {else}
          <input type="text" id="receiver_id" name="receiver_id" value="" />	
			<select id="distination" name="distination" onChange="document.getElementById('receiver_id').value=this.value;"> 
				<option value="" selected="selected">选择一个地点...</option> 
		{foreach from=$info.receiver_info item=fri}				
				<option value="{$fri.user}">{$fri.real_name}</option> 
		{/foreach}				
			</select> 
		{/if}
		</div>
		<div>
			<textarea  style="width:520px;height:155px" col="80" row="90" name="mailbody">abc</textarea>
		</div>
		<div>
			<input type="submit" value="Send"></input>
		</div>
	</form>
	</div>
	{elseif $info.sub == "sent"}	
	<label>Mail sent</label>
	{else}
	{/if}
	

{else}


{/if}	


        <p class="pages"><a href="#" class="preview">&lt;</a><a href="#">1</a><a href="#">2</a><a href="#">3</a><a href="#">4</a><a href="#">5</a><a href="#" class="next">&gt;</a></p>
      </div>
    </div>
    <div class="right">
    	<div class="visitor smodule">
        	<a href="#" class="more">查看更多</a>
            <h5>最近访问</h5>
            <div class="clear"></div>
            <!-- loop -->
			{foreach from=$info.recent_visitor item=visitor}
            <a href="friend.php?uid={$visitor.visitor_id}"><img src="../images/icon/{$visitor.image_path}" /><p>{$visitor.real_name}</p></a>
			{/foreach}
        </div>
        <div class="friends smodule">
        	<a href="#" class="more">查看更多</a>
            <h5>我的收藏</h5>
            <div class="clear"></div>
			{foreach from=$info.friend_list item=friend}
            <a href="friend.php?uid={$friend.friend_id}"><img src="../images/icon/{$friend.image_path}" /><p>{$friend.real_name}</p></a>
			{/foreach}	
        </div>
	
        <div class="groups smodule">
        	<a href="#" class="more">查看更多</a>
            <h5>我的群组</h5>
            <div class="clear"></div>
            <a href="#"><img src="../img/1smallHead.png" /><p>echo</p></a>
        </div>
    </div>

</div>

{include file="footer.tpl" title=foo}
